#pragma once

class CEFDcore
{
public:
	CEFDcore(void);
	~CEFDcore(void);
protected:
	CString m_Workdir;
	struct fileinfo * nodenew;
	BOOL m_KeepFileName;
	void GiveSingleName(struct fileinfo * node);
	void GiveMultiName(struct fileinfo * node, struct filecounter * counter);
	void ListHeadForward(struct fileinfo * head, struct filecounter * counter);
	void JudgeMultiFile(struct filecounter * counter);
public:
	int Efd(void);
	void SetPath(WCHAR * path);
	void SetKeepFileName(BOOL b);
	void GiveName(struct fileinfo * head, struct filecounter * counter, int * errorcode);

	void Booklet(WCHAR * workdir, int * errorcode);
private:
	void MovePicture(WCHAR * workdir);
	bool PictureJudge(WCHAR * szFilename);
	bool ImageExist(WCHAR * workdir);
public:
	void Report(struct filecounter * FileCounter);
	void FileDeal(struct fileinfo * head , WCHAR * workdir , int * errorcode);
	int RenameFile(struct fileinfo * node, WCHAR * targetcue_temp, WCHAR * workdir);
	void CueDeal(struct fileinfo * node,WCHAR * workdir,int * errorcode);
};
